<template>
  <div class="user-client">
    <history-record @add-new="handleAddNew" />

    <chat-dialog />

    <!-- 新建对话弹窗 -->
    <before-new-chat ref="addDialog" @confirm="confirmInfo" />
  </div>
</template>

<script>
  import io from 'socket.io-client'
  import HistoryRecord from './components/HistoryRecord.vue'
  import ChatDialog from './components/ChatDialog.vue'
  import BeforeNewChat from '@/views/userClient/components/BeforeNewChat.vue'

  export default {
    name: 'UserClient',
    components: {
      BeforeNewChat,
      ChatDialog,
      HistoryRecord,
    },
    data() {
      return {}
    },
    mounted() {},
    methods: {
      handleAddNew() {
        this.$refs.addDialog.showDialog()
      },
      confirmInfo(form) {
        console.log(form)
      },
    },
  }
</script>

<style lang="scss" scoped>
  .user-client {
    display: flex;
    height: 100%;
    margin: 0 auto;
    background: #ffffff;
  }
</style>
